Retinal Vessel Image Enhancement Method and System

ABSTRACT

An retinal vessel image enhancement method comprises: constructing a blood vascular dictionary; applying Frangi-based filtering to retinal vessel images, deciding blood vessels in a second image sub-block belong to wide or thin vessels by directional filtering, and setting residual error weight and residual error threshold of a vascular region; calculating inner products between the second image sub-block and each first image sub-block, selecting a first image sub-block with maximum inner product, and calculating its corresponding sparse coefficient; calculating residual error image, and calculating the residual error of the vascular region according to the residual error weight of the vascular region, when the residual error is greater than the residual error threshold, the residual error image is set as a second image sub-block, repeating and calculating residual error; reconstructing the second image sub-block according to the sparse coefficient, then restructuring each reconstructed second image sub-block, obtaining enhanced retinal vessel images.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation-application of International(PCT) Patent Application No. PCT/CN2016/099026, filed on Sep. 14, 2016,the entire contents of which are hereby incorporated by reference.

TECHNICAL FIELD

The present invention relates to the field of image processingtechnology, and more particularly to a method and system for retinalvessel image enhancement.

BACKGROUND

Retinal imaging is one of the important means of medical aided diagnosisand treatment, which can directly or indirectly determine a variety ofocular diseases by analyzing eyeball blood vessel images. In ocularimages, there exist a variety of retinal vessels with varying degrees ofthickness, more clear and accurate retinal vessel images can be obtainedby enhancing these images, thereby facilitating aided clinicaldiagnosis.

There are many methods for retinal vessel image enhancement, in general,the most frequently used methods are as follows:

Neighborhood smoothing method, it calculates an average betweengrayscale of a certain pixel and that of its neighbors in an image, anduses the average value as the grayscale value of the pixel. Theadvantage of this method is its simplicity, and its disadvantage is thatit can make the retinal vessel image blurred, significantly decreasingthe clarity of blood vessels.

Edge-preserving smoothing method, namely design different templates, andcalculate variances of the grayscale of neighborhood pixels to a certainpixel point in an image, then select a template with minimum varianceand take the average grayscale value of pixels contained in the templateas the grayscale value of the pixel. The advantage of this method isthat it can preferably preserve edges, and its disadvantage is that thetarget is a linear structure in the retinal vessel image, it isdifficult to distinguish noise from target by analysis of variance.

Multiple images averaging method, it chooses multiple images of eyeballblood vessels taken from the same person, and performs the averageprocessing. The advantage of this method is that it can suppress noiseto a certain extent, and its disadvantage is that it requires multipleimages of eyeball blood vessels, not applicable to a single retinalvessel image.

Frangi-based filtering image enhancement, it enhances a linear structureusing eigenvector directions and eigenvalues of Hessian matrix in thelinear structure, however, such methods can lead to loss of gracile andthin vessels.

Image denoising methods based on sparse representation, they can get aredundant dictionary by training, then reconstruct the original imageaccording to sparse coefficients, thereby obtain a noise-suppressedimage due to no noise in the selected dictionary atoms. This methodpossesses better noise suppression effects, however, there still existsa problem of loss of gracile and thin vessels when it is applied to theissue of retinal vessel image enhancement.

Thus it can be seen that the existing methods for retinal vessel imageenhancement are not able to better reserve thin vessels at the same timeof enhancing retinal vessels.

SUMMARY

In the present invention, the technical problem to be solved is toprovide a method and system for retinal vessel image enhancement,designed to overcome the shortage of methods for retinal vessel imageenhancement in the prior art that are not able to better reserve thinvessels at the same time of enhancing retinal vessels. The invention isrealized as the following:

A method for retinal vessel image enhancement, comprising the followingsteps:

Step A: constructing a blood vascular dictionary using retinal vessellearning images, the above-mentioned blood vascular dictionary comprisesa preset number of first image sub-blocks;

Step B: applying the Frangi-based filtering to the retinal vessel imagesto be enhanced, and dividing the obtained images having undergoneFrangi-based filtering into a plurality of second image sub-blocksoverlapped each other;

Step C: applying directional filtering to the second image sub-block bymeans of a directional filter, and deciding that the retinal vesselscontained in the second image sub-block belong to wide vessels or thinvessels based on directional filtering results;

Step D: determining a vascular region in the second image sub-block, andsetting residual error weight and residual error threshold of a vascularregion in the second image sub-block according to retinal vessel typescontained in the second image sub-block;

Step E: calculating the inner products between the second imagesub-block and each first image sub-block in the blood vasculardictionary, determining a first image sub-block with maximum innerproduct among them, and calculating the sparse coefficient correspondingto the first image sub-block with maximum inner product;

Step F: calculating a residual error image according to the first imagesub-block with maximum inner product and the second image sub-block, andcalculating the residual error of the vascular region in the secondimage sub-block according to the residual error weight of the vascularregion;

Step G: when the norm of the residual error is greater than the residualerror threshold, setting the residual error image as the second imagesub-block, and jump to Step E, otherwise, jump to Step H;

Step H: reconstructing the second image sub-block according to thesparse coefficient;

Step I: reconstructing the retinal vessel image according to eachreconstructed second image sub-block, and thereby obtaining an enhancedretinal vessel image.

Furthermore, the Step A comprises the sub-steps of:

Sub-step A1: partitioning the retinal vessel learning image into severalfirst image sub-blocks with the same size; and the number of first imagesub-blocks is greater than the set number;

Sub-step A2: calculating all the inner products of every two first imagesub-blocks;

Sub-step A3: selecting the preset number of first image sub-blocks withminimum inner product, and constructing the blood vascular dictionary.

Furthermore, the Step B comprises the sub-steps of:

Sub-step B1: supposing the retinal vessel image to be enhanced asI(x,y), and letting G(x, y; σ) be a two-dimensional Gaussian function atscale σ, smoothing the retinal vessel image I(x,y) to be enhanced usingthe two-dimensional Gaussian function, thereby obtaining a smoothedimage I_(σ)(x, y):

I_(σ)(x, y)=I(x, y)⊗G(x, y; σ), where

${{G\left( {x,{y;\sigma}} \right)} = {\frac{1}{\left( {\sqrt{2\pi}\sigma} \right)^{2}}e^{\frac{x^{2} + y^{2}}{2\sigma^{2}}}}},$

and ⊗ denotes a convolutional operation;

Sub-step B2: calculating a Hessian matrix H_(σ)(x, y) at point (x,y) andscale σ in the smoothed image I_(σ)(x, y):

${{H_{\sigma}\left( {x,y} \right)} = \begin{bmatrix}\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial x^{2}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} \\\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial y^{2}}\end{bmatrix}};$

Sub-step B3: performing an eigenvalue analysis of the Hessian matrixH_(σ)(x, y), then obtaining the eigenvalues λ₁ and λ₂, ordered as|λ₁|<|λ₂|; accordingly, the vascular feature at scale s can be expressedby:

${v_{0}(s)} = \left\{ {\begin{matrix}{e^{- \frac{R_{\beta}^{2}}{2\; \beta}} \cdot \left( {1 - e^{- \frac{S^{2}}{2c^{2}}}} \right)} & {\lambda_{2} \leq 0} \\0 & {\lambda_{2} > 0}\end{matrix};} \right.$

Where

${R_{\beta} = \frac{\lambda_{1}}{\lambda_{2}}},$

S=√{square root over (λ₁ ²+λ₂ ²)}, β and C are the preset constants;

Sub-step B4: In a multiscale framework, selecting the maximum value ofv₀(s) at each scale as a Frangi-based filtering result v of the retinalvessel image I(x, y) to be enhanced:

v=max_(s) _(min) _(≤s≤s) _(max) v ₀(s)

Where s_(min) and s_(max) denote the minimum and maximum scales,respectively;

Sub-step B5: dividing the Frangi-based filtering result v into aplurality of second image sub-blocks overlapped each other.

Furthermore, the Step C comprises the sub-steps of:

Sub-step C1: setting up 8 directional filters in the directions

${\theta_{1} = 0},{\theta_{2} = \frac{\pi}{8}},{\theta_{3} = \frac{\pi}{4}},{\theta_{4} = \frac{3\; \pi}{8}},{\theta_{5} = \frac{\pi}{2}},{\theta_{6} = \frac{5\; \pi}{8}},{\theta_{7} = {\frac{3\; \pi}{4}\mspace{14mu} {and}}}$${\theta_{8} = \frac{7\; \pi}{8}},$

respectively;

Sub-step C2: assuming that Ω₁ is a vascular region by the directionalfilter in the direction θ_(i), Ω₂ is a non-vascular region, therespective energy posE_(θ) _(i) and negE_(θ) _(i) of the two region iscalculated as follows:

posE _(θ) _(i) =Σ_(x=1) ^(N) ¹ Σ_(y=1) ^(N) ¹ |v(x,y)|², (x,y)∈Ω₁;

negE _(θ) _(i) =Σ_(x′=1) ^(N) ² Σ_(y′=1) ^(N) ² |v(x′,y′)|², (x′,′y)∈Ω₂;

where v(x, y) is the value of the Frangi-based filtering result v atpoint (x,y), N₁ is the number of pixels in Ω₁, and N₂ is the number ofpixels in Ω₂;

Sub-step C3: calculating the energy difference between posE_(θ) _(i) andnegE_(θ) _(i) :

Eθ _(i)=posE _(θ) _(i) −negE _(θ) _(i) ;

Sub-step C4: determining the maximum energy difference among theabove-mentioned 8 directions:

E _(max)=max_(i=1,2, . . . , 8) Eθ _(i);

Sub-step C5: deciding blood vessel types based on the E_(max), whenE_(max)≥T, the retinal vessel image contained in the second imagesub-block belongs to wide vessels, otherwise it belongs to thin vessels.

Furthermore, the Step D comprises the sub-steps of:

Sub-step D1: taking the vascular region by the directional filtercorresponding to the maximum energy difference among the 8 directions asa vascular region Ω₁, and taking the non-vascular region by thedirectional filter corresponding to the maximum energy difference amongthe 8 directions as a non-vascular region Ω₂;

Sub-step D2: for the second image sub-block containing an retinal vesselimage that belongs to wide vessels, setting the residual error weight ofthe vascular region Ω₁ in the second image sub-block to 1, such that theresidual error threshold T_(R)=T₁; for the second image sub-blockcontaining an retinal vessel image that belongs to thin vessels, settingits residual error weight of the vascular region Ω₁ to 1/v_(max), suchthat the residual error threshold T_(R)=T₂, where v_(max) denotes themaximum value among Frangi-based filtering results of the second imagesub-block.

Furthermore, the Step E comprises the sub-steps of:

Sub-step E1: vectorizing the second image sub-block as x, and lettingd_(i) be first No. i image sub-block in the blood vascular dictionary;

Sub-step E2: taking a first image sub-block corresponding to the largestone of inner products between each first image sub-block in the bloodvascular dictionary and the second image sub-block x as the selected No.1 first image sub-block d_(r0):

d _(r0)=arg max_(i∈(1,2, . . . ,k)) |<x, d _(i)>|;

Where k denotes the number of first image sub-blocks in the bloodvascular dictionary, r₀ denotes an index number of the dictionary, and<x, d_(i)> denotes the computation of inner product between x and d_(i);

Sub-step E3: calculating the sparse coefficient a_(r0) corresponding tothe first image sub-block d_(r0):

a _(r0) =<x, d _(r0)>.

Furthermore, the Step F comprises the sub-steps of:

Sub-step F1: calculating the residual error image R of the vascularregion in the second image sub-block:

R=x−<x, d _(r0) >d _(r0);

Sub-step F2: multiplying the residual error R by the residual errorweight of the vascular region in the second image sub-block, andobtaining the weighted sum as the final residual error of vascularregion in the second image sub-block.

Furthermore, the reconstructed second image sub-block is defined as:

{circumflex over (x)}=Σ_(r0∈S)d_(r0)a_(r0)

Where S denotes a set of multiple sparse coefficients determined bymultiple execution of Step E, d_(r0) denotes a first image sub-blockwith maximum inner product determined by execution of Step E each timeand a_(r0) denotes a sparse coefficient corresponding to d_(r0).

Furthermore, the Step I comprises the following:

Merge non-overlapping parts of all the reconstructed second imagesub-blocks, thereby obtaining a complete enhanced retinal vessel image.

A system for retinal vessel image enhancement, comprising:

Blood vascular dictionary constructing module, which is configured toconstruct a blood vascular dictionary using retinal vessel learningimages, the blood vascular dictionary comprises a preset number of firstimage sub-blocks;

Image filtering and dividing module, which is configured to apply theFrangi-based filtering to a retinal vessel image to be enhanced, anddivide the enhanced retinal vessel images into a plurality of secondimage sub-blocks overlapped each other;

Blood vessel type determining module, which is configured to applydirectional filtering to the second image sub-block by means of adirectional filter, and decide that the blood vessels contained in thesecond image sub-block belong to wide vessels or thin vessels based ondirectional filtering results;

Vascular region and its residual error weight and residual errorthreshold determining module, which is configured to determine avascular region in the second image sub-block, and set residual errorweight and residual error threshold of a vascular region in the secondimage sub-block according to blood vessel types contained in the secondimage sub-block;

Sparse coefficient calculating module, which is configured to calculatethe inner products between the second image sub-block and each firstimage sub-block in the blood vascular dictionary, determine a firstimage sub-block with maximum inner product among them, and calculate thesparse coefficient corresponding to the first image sub-block withmaximum inner product;

Vascular region residual error calculating module, which is configuredto calculate a residual error image according to the first imagesub-block with maximum inner product and the second image sub-block, andcalculate the residual error of the vascular region in the second imagesub-block according to the residual error weight of the vascular region;

Jumping module, which is configured to, when the norm of the residualerror is greater than the residual error threshold, set the residualerror image as the second image sub-block, and jump to the sparsecoefficient calculating module, otherwise, jump to second imagesub-block reconstructing module;

Second image sub-block reconstructing module, which is configured toreconstruct the second image sub-block according to the sparsecoefficient;

Retinal vessel image reconstructing module, which is configured toreconstruct the retinal vessel image according to each reconstructedsecond image sub-block, and thereby obtaining an enhanced retinal vesselimage.

Furthermore, the blood vascular dictionary constructing modulecomprises:

Retinal vessel learning image dividing module, which is configured topartition the retinal vessel learning image into several first imagesub-blocks with the same size; and the number of first image sub-blocksis greater than the set number;

First image sub-block inner product module, which is configured tocalculate all the inner products of every two first image sub-blocks;

Blood vascular dictionary constructing submodule, which is configured toselect the preset number of first image sub-blocks with minimum innerproduct, and construct the blood vascular dictionary.

Furthermore, the image filtering and dividing module comprises:

Smooth filtering module, which is configured to define the retinalvessel image to be enhanced as I(x,y), and let G(x, y; σ) be atwo-dimensional Gaussian function at scale σ, smooth the retinal vesselimage I(x,y) to be enhanced using the two-dimensional Gaussian function,thereby obtaining a smoothed image I_(σ)(x,y):

I_(σ)(x, y)=I(x, y)⊗G(x, y; σ), where

${{G\left( {x,{y;\sigma}} \right)} = {\frac{1}{\left( {\sqrt{2\; \pi}\sigma} \right)^{2}}e^{- \frac{x^{2} + y^{2}}{2\; \sigma^{2}}}}},$

and ⊗ denotes a convolutional operation;

Hessian matrix calculating module, which is configured to calculate aHessian matrix H_(σ)(x, y) at point (x,y) and scale σ in the smoothedimage I_(σ)(x,y):

${{H_{\sigma}\left( {x,y} \right)} = \begin{bmatrix}\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial x^{2}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} \\\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial y^{2}}\end{bmatrix}};$

Eigenvalue analyzing module, which is configured to perform aneigenvalue analysis of the Hessian matrix H_(σ)(x, y), then obtain theeigenvalues λ₁and λ₂, ordered as |λ₁|<|λ₂|; accordingly, the vascularfeature at scale s can be expressed by:

${v_{0}(s)} = \left\{ {\begin{matrix}{e^{- \frac{R_{\beta}^{2}}{2\; \beta}} \cdot \left( {1 - e^{- \frac{S^{2}}{2c^{2}}}} \right)} & {\lambda_{2} \leq 0} \\0 & {\lambda_{2} > 0}\end{matrix};} \right.$

Where

${R_{\beta} = \frac{\lambda_{1}}{\lambda_{2}}},$

S=√{square root over (λ₁ ²+λ₂ ²)}, β and C are the preset constants;

Frangi-based filtering result generating module, which is configured toselect the maximum value of v₀(s) at each scale as a Frangi-basedfiltering result v of the retinal vessel image I(x,y) to be enhanced:

v=max_(s) _(min) _(≤s≤s) _(max) v ₀(s)

Where s_(min) and s_(max) denote the minimum and maximum scales,respectively;

Second image sub-block dividing module, which is configured to dividethe Frangi-based filtering result v into a plurality of second imagesub-blocks overlapped each other.

Furthermore, the blood vessel type determining module comprises:

Directional filter setting module, which is configured to set up 8directional filters in the directions θ₁=0,

${\theta_{2} = \frac{\pi}{8}},{\theta_{3} = \frac{\pi}{4}},{\theta_{4} = \frac{3\; \pi}{8}},{\theta_{5} = \frac{\pi}{2}},{\theta_{6} = \frac{5\; \pi}{8}},{\theta_{7} = {{\frac{3\; \pi}{4}\mspace{14mu} {and}\mspace{14mu} \theta_{8}} = \frac{7\; \pi}{8}}},$

respectively;

Energy calculating module, which is configured to, assuming that Ω₁ is avascular region by the directional filter in the direction θ_(i), Ω₂ isa non-vascular region, thus calculate the respective energy posE_(θ)_(i) and negE_(θ) _(i) of the two region as follows:

posE _(θ) _(i) =Σ_(x=1) ^(N) ¹ Σ_(y=1) ^(N) ¹ |v(x,y)|², (x,y)∈Ω₁;

negE _(θ) _(i) =Σ_(x′=1) ^(N) ² Σ_(y′=1) ^(N) ² |v(x′,y′)|², (x′,′y)∈Ω₂;

where v(x, y) is the value of the Frangi-based filtering result v atpoint (x,y), N₁ is the number of pixels in Ω₁, and N₂ is the number ofpixels in Ω₂;

Energy difference calculating module, which is configured to calculatethe energy difference between posE_(θ) _(i) and negE_(θ) _(i) :

Eθ _(i)=posE _(θ) _(i) −negE _(θ) _(i) ;

Maximum energy difference determining module, which is configured todetermine the maximum energy difference among the above-mentioned 8directions:

E _(max)=max_(i=1,2, . . . , 8) Eθ _(i);

Blood vessel type determining submodule, which is configured to decideblood vessel types based on the E_(max), if E_(max)≥T, the retinalvessel image contained in the second image sub-block belongs to widevessels, otherwise it belongs to thin vessels.

Furthermore, the vascular region and its residual error weight andresidual error threshold determining module comprises:

Vascular region determining module, which is configured to take thevascular region by the directional filter corresponding to the maximumenergy difference among the 8 directions as a vascular region Ω₁, andtake the non-vascular region by the directional filter corresponding tothe maximum energy difference among the 8 directions as a non-vascularregion Ω₂;

Residual error weight and residual error threshold determining module isconfigured to, for the second image sub-block containing an retinalvessel image that belongs to wide vessels, set the residual error weightof the vascular region Ω₁ to 1, such that the residual error thresholdT_(R)=T₁; for the second image sub-block containing an retinal vesselimage that belongs to thin vessels, set its residual error weight of thevascular region Ω₁ to 1/v_(max), such that the residual error thresholdT_(R)=T₂, where v_(max) denotes the maximum value among Frangi-basedfiltering results of the second image sub-block.

Furthermore, the sparse coefficient calculating module comprises:

Image vectorizing module, which is configured to vectorize the secondimage sub-block as x, and take d_(i) as first No. i image sub-block inthe blood vascular dictionary;

First image sub-block selecting module, which is configured to take afirst image sub-block corresponding to the largest one of inner productsbetween each first image sub-block in the blood vascular dictionary andthe second image sub-block x as the selected No. 1 first image sub-blockd_(r0):

d _(r0)=arg max_(i∈(1,2, . . . ,k)) |<x, d _(i)>|;

Where k denotes the number of first image sub-blocks in the bloodvascular dictionary, r₀ denotes an index number of the dictionary, and<x, d_(i)> denotes the computation of inner product between _(x) andd_(i);

Sparse coefficient calculating submodule, which is configured tocalculate the sparse coefficient a_(r0) corresponding to the first imagesub-block d_(r0):

a _(r0) =<x, d _(r0)>.

Furthermore, the vascular region residual error calculating modulecomprises:

Residual error preliminarily calculating module, which is configured tocalculate the residual error image R of the vascular region in thesecond image sub-block:

R=x−<x, d _(r0) >d _(r0);

Residual error weighting module, which is configured to multiply theresidual error R by the residual error weight of the vascular region inthe second image sub-block, and obtain the weighted sum as the finalresidual error of vascular region in the second image sub-block.

Furthermore, the reconstructed second image sub-block is defined as:

{circumflex over (x)}=Σ_(r0∈S)d_(r0)a_(r0)

Where S denotes a set of multiple sparse coefficients determined by thesparse coefficient calculating module multiple times, d_(r0) denotes afirst image sub-block with maximum inner product determined by thesparse coefficient calculating module each time and a_(r0) denotes asparse coefficient corresponding to d_(r0).

Furthermore, the retinal vessel image reconstructing module isspecifically used to:

merge non-overlapping parts of all the reconstructed second imagesub-blocks, thereby obtaining a complete enhanced retinal vessel image.

The present invention constructs a blood vascular dictionary usingretinal vessel learning images; divides blood vessels in a second imagesub-block into wide and thin vessels by means of directional filtering,sets residual error weight and residual error threshold of a vascularregion according to wide and thin blood vessels; calculates the innerproducts between the second image sub-block and each first imagesub-block in the dictionary, selects the first image sub-block withmaximum inner product, and calculates its corresponding sparsecoefficient; calculates the residual error of the vascular region in thesecond image sub-block according to the residual error weight of thevascular region in the selected first image sub-block, if the residualerror is greater than the residual error threshold, repeats a process ofselecting the first image sub-block and calculating residual error;reconstructs the second image sub-block according to the sparsecoefficient, and restructures each reconstructed second image sub-block,finally obtains enhanced retinal vessel images. The present inventionreduces background noise and avoids loss of thin vessels brought aboutby blood vessel enhancement using Frangi-based filtering in the priorart, achieving the enhancement of retinal vessel images and improvingthe visual effects of retinal vessel images, which can be used forpretreatment of retinal vessel image analysis.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an overall flowchart of the method for retinal vessel imageenhancement provided in the present invention;

FIG. 2 shows an overall constitute diagram of the system for retinalvessel image enhancement provided in the present invention;

FIG. 3 shows a directional diagram of 8 directional filters.

DESCRIPTION OF THE EMBODIMENTS

In order to make the purpose, technical solutions and advantages of thisinvention clearer, the present invention will now be further describedin detail hereinafter with reference to the drawings and embodiments.

As shown in FIG. 1, the method for retinal vessel image enhancementprovided in the present invention, comprising the following steps:

Step A: constructing a blood vascular dictionary using retinal vessellearning images, the above-mentioned blood vascular dictionary comprisesa preset number of first image sub-blocks.

The Step A specifically comprises the sub-steps of:

Sub-step A1: partitioning the retinal vessel learning image into severalfirst image sub-blocks of the same size; and the number of first imagesub-blocks should be greater than the preset number. The retinal vessellearning image can be partitioned into a plurality of first imagesub-blocks with a size of 8*8 according to artificially partitionedresults of the retinal vessel learning image, moreover, these firstimage sub-blocks should include retinal vessel image features such aswide vessels, gracile and thin vessels, and highlighted parts.

Sub-step A2: calculating all the inner products of every two first imagesub-blocks; the smaller the inner product is, the lower degree ofsimilarity between two first image sub-blocks.

Sub-step A3: selecting the preset number of first image sub-blocks withminimum inner product, and constructing the blood vascular dictionary.Let K be a set number, such that select K most dissimilar first imagesub-blocks and construct a blood vascular dictionary.

Step B: applying the Frangi-based filtering to the retinal vessel imagesto be enhanced, and dividing the obtained images having undergoneFrangi-based filtering into a plurality of second image sub-blocksoverlapped each other.

The Step B specifically comprises the sub-steps of:

Sub-step B1: defining the retinal vessel image to be enhanced as I(x,y),and let G(x, y; σ) be a two-dimensional Gaussian function at scale σ,smoothing the retinal vessel image I(x,y) to be enhanced using thetwo-dimensional Gaussian function, thereby obtaining a smoothed imageI_(σ)(x,y):

I_(σ)(x, y)=I(x, y)⊗G(x, y; σ), where

${{G\left( {x,{y;\sigma}} \right)} = {\frac{1}{\left( {\sqrt{2\; \pi}\sigma} \right)^{2}}e^{- \frac{x^{2} + y^{2}}{2\; \sigma^{2}}}}},$

and ⊗ denotes a convolutional operation;

Sub-step B2: calculating a Hessian matrix H_(σ)(x, y) at point (x,y) andscale σ in the smoothed image I_(σ)(x,y):

${{H_{\sigma}\left( {x,y} \right)} = \begin{bmatrix}\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial x^{2}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} \\\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial y^{2}}\end{bmatrix}};$

Sub-step B3: performing an eigenvalue analysis of the Hessian matrixH_(σ)(x,y), then obtaining the eigenvalues λ₁and λ₂ , ordered as|λ₁|<|λ₂|; if point (x,y) belongs to a tubular structure, such that|λ₁|≈0, and the value of |λ₂| tends to be greater, accordingly, thevascular feature at scale s can be expressed by:

${v_{0}(s)} = \left\{ {\begin{matrix}{e^{- \frac{R_{\beta}^{2}}{2\; \beta}} \cdot \left( {1 - e^{- \frac{S^{2}}{2c^{2}}}} \right)} & {\lambda_{2} \leq 0} \\0 & {\lambda_{2} > 0}\end{matrix};} \right.$

Where

${R_{\beta} = \frac{\lambda_{1}}{\lambda_{2}}},$

S=√{square root over (λ₁ ²+λ₂ ²)}, β and C are the preset constants;

Sub-step B4: In a multiscale framework, selecting the maximum value ofv₀(s) at each scale as a Frangi-based filtering result v of the retinalvessel image I(x, y) to be enhanced:

$v = {\max\limits_{s_{\min} \leq s \leq s_{\max}}{v_{0}(s)}}$

Where s_(min) ands s_(max) denote the minimum and maximum scales,respectively;

Sub-step B5: dividing the Frangi-based filtering result v into aplurality of second image sub-blocks overlapped each other.

Step C: applying directional filtering to the second image sub-block bymeans of a directional filter, and deciding that the blood vesselscontained in the second image sub-block belong to wide vessels or thinvessels based on directional filtering results.

The Step C specifically comprises the sub-steps of:

Sub-step setting up 8 directional filters in the directions θ₁=0,

${\theta_{2} = \frac{\pi}{8}},{\theta_{3} = \frac{\pi}{4}},{\theta_{4} = \frac{3\; \pi}{8}},{\theta_{5} = \frac{\pi}{2}},{\theta_{6} = \frac{5\; \pi}{8}},{\theta_{7} = {{\frac{3\; \pi}{4}\mspace{14mu} {and}\mspace{14mu} \theta_{8}} = \frac{7\; \pi}{8}}},$

respectively (as shown in FIG. 3).

Sub-step C2: assuming that Ω₁ is a vascular region (white region) by thedirectional filter in the direction θ₁, Ω₂ is a non-vascular region(black region), the respective energy posE_(θ) _(i) , and negE_(θ) _(i)of the two region is calculated as follows:

posE _(θ) _(i) =Σ_(x=1) ^(N) ¹ Σ_(y=1) ^(N) ¹ |v(x,y)|², (x,y)∈Ω₁;

negE _(θ) _(i) =Σ_(x′=1) ^(N) ² Σ_(y′=1) ^(N) ² |v(x′,y′)|², (x′,′y)∈Ω₂;

where v(x,y) is the value of the Frangi-based filtering result v atpoint (x,y), N₁ is the number of pixels in Ω₁, and N₂ is the number ofpixels in Ω₂.

Sub-step C3: calculating the energy difference between posE_(θ) _(i) andnegE_(η) _(i) :

Eθ _(i)=posE _(θ) _(i) −negE _(θ) _(i) ;

Sub-step C4: determining the maximum energy difference among theabove-mentioned 8 directions:

$E_{\max} = {\max\limits_{{i = 1},2,\ldots \mspace{14mu},8}{E\; \theta_{i}}}$

Sub-step C5: deciding blood vessel types based on the E_(max), ifE_(max)≥T, the retinal vessel image contained in the second imagesub-block belongs to wide vessels, otherwise it belongs to thin vessels.Where T denotes a preset value.

Step D: determining a vascular region in the second image sub-block, andsetting residual error weight and residual error threshold of a vascularregion in the second image sub-block according to blood vessel typescontained in the second image sub-block.

The Step D specifically comprises the sub-steps of:

Sub-step D1: taking the vascular region by the directional filtercorresponding to the maximum energy difference (namely the directionalfilter corresponding to E_(max) in the direction θ_(i)) among the 8directions as a vascular region Ω₁, and taking the non-vascular regionby the directional filter corresponding to the maximum energy difference(namely the directional filter corresponding to E_(max) in the directionθ_(i)) among the 8 directions as a non-vascular region Ω₂.

Sub-step D2: for the second image sub-block containing an retinal vesselimage that belongs to wide vessels, setting the residual error weight ofthe vascular region Ω₁ in the second image sub-block to 1, such that theresidual error threshold T_(R)=T₁; for the second image sub-blockcontaining an retinal vessel image that belongs to thin vessels, settingits residual error weight of the vascular region Ω₁ to 1/v_(max), suchthat the residual error threshold T_(R)=T₂, where v_(max) denotes themaximum value among Frangi-based filtering results of the second imagesub-block.

The Step D can further comprises the sub-steps of:

Sub-step D3: setting the selected index set S of first image sub-blockto an empty set, such that S=φ, then add the index number r₀ of theselected first image sub-block d_(r0) into the set S, such that S=S∪r0.

Step E: calculating the inner products between the second imagesub-block and each first image sub-block in the blood vasculardictionary, determining a first image sub-block with maximum innerproduct among them, and calculating the sparse coefficient correspondingto the first image sub-block with maximum inner product.

The Step E specifically comprises the sub-steps of:

Sub-step E1: vectorizing the second image sub-block as x, and let d_(i)be first No. i image sub-block in the blood vascular dictionary.

Sub-step E2: taking a first image sub-block corresponding to the largestone of inner products between each first image sub-block in the bloodvascular dictionary and the second image sub-block x as the selected No.1 first image sub-block d_(r0):

${d_{r\; 0} = {\arg {\max\limits_{i \in {({1,2,\ldots \mspace{14mu},k})}}{{{< x},{d_{i} >}}}}}};$

Where k denotes the number of first image sub-blocks in the bloodvascular dictionary, r₀ denotes an index number of the dictionary, and<x,d_(i)> denotes the computation of inner product between x and d_(i);

Sub-step E3: calculating the sparse coefficient a_(r0) corresponding tothe first image sub-block d_(r0):

a _(r0) =<x, d _(r0)>.

add the index number r₀ of the selected first image sub-block d_(r0)into the set S, such that S=S∪r0.

Step F: calculating a residual error image according to the first imagesub-block with maximum inner product and the second image sub-block, andcalculating the residual error of the vascular region in the secondimage sub-block according to the residual error weight of the vascularregion.

The Step F specifically comprises the sub-steps of:

Sub-step F1: calculating the residual error image R of the vascularregion in the second image sub-block:

R=x−<x, d _(r0) >d _(r0);

Sub-step F2: multiplying the residual error R by the residual errorweight of the vascular region in the second image sub-block, andobtaining the weighted sum as the final residual error of vascularregion in the second image sub-block.

Step G: when the norm of the residual error is greater than the residualerror threshold, setting the residual error image as the second imagesub-block, and jumping to Step E, otherwise, jumping to Step H. That isto say, in the Step F, if the norm ∥R∥ of the residual error R isgreater than the residual error threshold T_(R), jump to Step E,otherwise, jump to Step H.

Step H: reconstructing the second image sub-block according to thesparse coefficient; the reconstructed second image sub-block is definedas:

$\hat{x} = {\sum\limits_{{r\; 0} \in S}^{\;}{d_{r\; 0}a_{r\; 0}}}$

Where S denotes a set of multiple sparse coefficients determined bymultiple execution of Step E, d_(r0) denotes a first image sub-blockwith maximum inner product determined by execution of Step E each timeand a_(r0) denotes a sparse coefficient corresponding to d_(r0).

Step I: reconstructing the retinal vessel image according to eachreconstructed second image sub-block, and thereby obtaining an enhancedretinal vessel image.

The Step I comprises the following:

merging non-overlapping parts of all the reconstructed second imagesub-blocks, thereby obtaining a complete enhanced retinal vessel image.

As shown in FIG. 2, based on the aforementioned method for retinalvessel image enhancement, the present invention also provides a systemfor retinal vessel image enhancement, comprising: blood vasculardictionary constructing module 1, image filtering and dividing module 2,blood vessel type determining module 5, vascular region and its residualerror weight and residual error threshold determining module 4, sparsecoefficient calculating module 3, vascular region residual errorcalculating module 6, jumping module 7, second image sub-blockreconstructing module 8, and retinal vessel image reconstructing module9.

Blood vascular dictionary constructing module 1 is configured toconstruct a blood vascular dictionary using retinal vessel learningimages, and the blood vascular dictionary comprises a preset number offirst image sub-blocks. Blood vascular dictionary constructing module 1comprises retinal vessel learning image dividing module, first imagesub-block inner product module, and blood vascular dictionaryconstructing sub-module.

Retinal vessel learning image dividing module is configured to partitionthe retinal vessel learning image into a plurality of first imagesub-blocks with the same size; and the number of first image sub-blocksis greater than the preset number.

First image sub-block inner product module is configured to calculateall the inner products of every two first image sub-blocks.

Blood vascular dictionary constructing sub-module is configured toselect the preset number of first image sub-blocks with minimum innerproduct, and construct the blood vascular dictionary.

Image filtering and dividing module 2 is configured to applyFrangi-based filtering to retinal vessel images to be enhanced, anddivides the obtained images having undergone Frangi-based filtering intoa plurality of second image sub-blocks overlapped each other. Imagefiltering and dividing module 2 comprises smooth filtering module,Hessian matrix calculating module, eigenvalue analyzing module,Frangi-based filtering result generating module, and second imagesub-block dividing module.

Smooth filtering module is configured to define the retinal vessel imageto be enhanced as I(x,y), and let G(x,y;σ) be a two-dimensional Gaussianfunction at scale σ, smooth the retinal vessel image I(x,y)to beenhanced using the two-dimensional Gaussian function, thereby obtaininga smoothed image I_(σ)(x, y):

I_(σ)(x, y)=I(x, y)⊗G(x, y; σ), where

${{G\left( {x,{y;\sigma}} \right)} = {\frac{1}{\left( {\sqrt{2\pi}\sigma} \right)^{2}}e^{- \frac{x^{2} + y^{2}}{2\sigma^{2}}}}},$

and ⊗ denotes a convolutional operation;

Hessian matrix calculating module is configured to calculate a Hessianmatrix H_(σ)(x, y) at point (x,y) and scale σ in the smoothed imageI_(σ)(x,y):

${H_{\sigma}\left( {x,y} \right)} = {\begin{bmatrix}\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial x^{2}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} \\\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial y^{2}}\end{bmatrix}.}$

Eigenvalue analyzing module is configured to performs an eigenvalueanalysis of the Hessian matrix H_(σ)(x, y), then obtain the eigenvaluesλ₁ and λ₂, ordered as |λ₁|<|λ₂|; accordingly, the vascular feature atscale s can be expressed by:

${v_{0}(s)} = \left\{ {\begin{matrix}\; & {{{e^{- \frac{R_{\beta}^{2}}{2\beta}} \cdot \left( {1 - e^{- \frac{S^{2}}{2c^{2}}}} \right)}\lambda_{2}} \leq 0} & \; \\0 & \; & {\lambda_{2} > 0}\end{matrix};} \right.$

Where

${R_{\beta} = \frac{\lambda_{1}}{\lambda_{2}}},$

S=√{square root over (λ₁ ²+λ₂ ²)}; β and C are the preset constants;

Frangi-based filtering result generating module is configured to, in amultiscale framework, select the maximum value of v₀(s) at each scale asa Frangi-based filtering result v of the retinal vessel image I(x,y) tobe enhanced:

$v = {\max\limits_{s_{\min} \leq s \leq s_{\max}}{v_{0}(s)}}$

Where s_(min) and s_(max) denote the minimum and maximum scales,respectively;

Second image sub-block dividing module is configured to divide theFrangi-based filtering result v into a plurality of second imagesub-blocks overlapped each other.

Blood vessel type determining module 5 is configured to applydirectional filtering to the second image sub-block by means of adirectional filter, and decide that the blood vessels contained in thesecond image sub-block belong to wide vessels or thin vessels based ondirectional filtering results. Blood vessel type determining module 5comprises directional filter setting module, energy calculating module,energy difference calculating module, maximum energy differencedetermining module, and blood vessel type determining sub-module.

Directional filter setting module is configured to set up 8 directionalfilters in the directions θ₁=0,

${\theta_{2} = \frac{\pi}{8}},{\theta_{3} = \frac{\pi}{4}},{\theta_{4} = \frac{3\pi}{8}},{\theta_{5} = \frac{\pi}{2}},{\theta_{6} = \frac{5\pi}{8}},{\theta_{7} = {{\frac{3\pi}{4}\mspace{14mu} {and}\mspace{14mu} \theta_{8}} = \frac{7\pi}{8}}},$

respectively.

Energy calculating module is configured to, assuming that Ω₁ is avascular region by the directional filter in the direction θ_(i), Ω₂ isa non-vascular region, thus calculate the respective energy posE_(θ)_(i) and negE_(θ) _(i) of the two region as follows:

posE _(θ) _(i) =Σ_(x=1) ^(N) ¹ Σ_(y=1) ^(N) ¹ |v(x,y)|², (x,y)∈Ω₁;

negE _(θ) _(i) =Σ_(x′=1) ^(N) ² Σ_(y′=1) ^(N) ² |v(x′,y′)|², (x′,′y)∈Ω₂;

where v(x,y) is the value of the Frangi-based filtering result v atpoint (x,y), N₁ is the number of pixels in Ω₁, and N₂ is the number ofpixels in Ω₂.

Energy difference calculating module is configured to calculate theenergy difference between posE_(θ) _(i) and negE_(θ) _(i) :

Eθ _(i)=posE _(θ) _(i) −negE _(θ) _(i) ;

Maximum energy difference determining module determines the maximumenergy difference among the above 8 directions:

$E_{\max} = {\max\limits_{{i = 1},2,\ldots \mspace{14mu},8}{E\; \theta_{i}}}$

Blood vessel type determining sub-module is configured to decide bloodvessel types based on the E_(max), if E_(max)≥T, the retinal vesselimage contained in the second image sub-block belongs to wide vessels,otherwise it belongs to thin vessels.

Vascular region and its residual error weight and residual errorthreshold determining module 4 is configured to determine a vascularregion in the second image sub-block, and set residual error weight andresidual error threshold of a vascular region in the second imagesub-block according to blood vessel types contained in the second imagesub-block. Vascular region and its residual error weight and residualerror threshold determining module 4 comprises vascular regiondetermining module and residual error weight and residual errorthreshold determining module.

Vascular region determining module is configured to take the vascularregion by the directional filter corresponding to the maximum energydifference among the 8 directions as a vascular region Ω₁, and take thenon-vascular region by the directional filter corresponding to themaximum energy difference among the 8 directions as a non-vascularregion Ω₂;

Residual error weight and residual error threshold determining module isconfigured to, for the second image sub-block containing an retinalvessel image that belongs to wide vessels, set the residual error weightof the vascular region Ω₁ to 1, such that the residual error thresholdT_(R)=T₁; for the second image sub-block containing an retinal vesselimage that belongs to thin vessels, set its residual error weight of thevascular region Ω₁ to 1/v_(max), such that the residual error thresholdT_(R)=T₂, where v_(max) denotes the maximum value among Frangi-basedfiltering results of the second image sub-block.

Sparse coefficient calculating module 3 is configured to calculate theinner products between the second image sub-block and each first imagesub-block in the blood vascular dictionary, determine a first imagesub-block with maximum inner product among them, and calculate thesparse coefficient corresponding to the first image sub-block withmaximum inner product. Sparse coefficient calculating module 3 comprisesimage vectorizing module, first image sub-block selecting module andsparse coefficient calculating sub-module.

Image vectorizing module is configured to vectorize the second imagesub-block as x, and take d_(i) as first No. i image sub-block in theblood vascular dictionary.

First image sub-block selecting module is configured to take a firstimage sub-block corresponding to the largest one of inner productsbetween each first image sub-block in the blood vascular dictionary andthe second image sub-block x as the selected No. 1 first image sub-blockd_(r0):

${d_{r\; 0} = {\arg {\max\limits_{i \in {({1,2,\ldots \mspace{14mu},k})}}{{{< x},{d_{i} >}}}}}};$

Where k denotes the number of first image sub-blocks in the bloodvascular dictionary, r₀ denotes an index number of the dictionary, and<x,d_(i)> denotes the computation of inner product between x and d_(i).

Sparse coefficient calculating submodule is configured to calculate thesparse coefficient a_(r0) corresponding to the first image sub-blockd_(r0):

a _(r0) =<x, d _(r0)>.

it adds the index number r₀ of the selected first image sub-block d_(r0)into the set S, such that S=S∪r0.

Vascular region residual error calculating module 6 is configured tocalculate a residual error image according to the first image sub-blockwith maximum inner product and the second image sub-block, and calculatethe residual error of the vascular region in the second image sub-blockaccording to the residual error weight of the vascular region. Vascularregion residual error calculating module 6 comprises residual errorpreliminarily calculating module and residual error weighting module.

Residual error preliminarily calculating module is configured tocalculate the residual error image R of the vascular region in thesecond image sub-block:

R=x−<x, d _(r0) >d _(r0);

Residual error weighting module is configured to multiply the residualerror R by the residual error weight of the vascular region in thesecond image sub-block, and obtain the weighted sum as the finalresidual error of vascular region in the second image sub-block.

Jumping module 7 is configured to, when the norm of the residual erroris greater than the residual error threshold, set the residual errorimage to a second image sub-block, and jump to the sparse coefficientcalculating module 3, otherwise, jump to second image sub-blockreconstructing module 8.

Second image sub-block reconstructing module 8 is configured toreconstruct the second image sub-block according to the sparsecoefficient. The reconstructed second image sub-block is defined as:

$\hat{x} = {\sum\limits_{{r\; 0} \in S}{d_{r\; 0}a_{r\; 0}}}$

Where S denotes a set of multiple sparse coefficients determined by thesparse coefficient calculating module multiple times, d_(r0) denotes afirst image sub-block with maximum inner product determined by thesparse coefficient calculating module each time and a_(r0) denotes asparse coefficient corresponding to d_(r0).

Retinal vessel image reconstructing module 9 is configured toreconstruct the retinal vessel image according to each reconstructedsecond image sub-block, and thereby obtaining an enhanced retinal vesselimage. Retinal vessel image reconstructing module 9 is specifically usedto:

merge non-overlapping parts of all the reconstructed second imagesub-blocks, thereby obtaining a complete enhanced retinal vessel image.Specific operating principles of each module in the present system canbe understood by reference to the corresponding steps in theaforementioned method for retinal vessel image enhancement.

The above descriptions are just preferred embodiments of the presentinvention, not for the purpose of limiting the invention, and anymodification, equivalent substitution or improvement within the spiritand principles of the invention, should be included in the protectionscope of the present invention.

What is claimed is:
 1. An retinal vessel image enhancement method,comprising the following steps: step A: constructing a blood vasculardictionary using retinal vessel learning images, wherein the bloodvascular dictionary comprises a preset number of first image sub-blocks;step B: applying Frangi-based filtering to a retinal vessel image to beenhanced, and dividing the obtained image into a plurality of secondimage sub-blocks overlapped each other; step C: applying directionalfiltering to the second image sub-blocks by means of a directionalfilter, and deciding that the retinal vessels contained in the secondimage sub-blocks belong to wide vessels or thin vessels based ondirectional filtering results; step D: determining a vascular region ineach of the second image sub-blocks, and setting residual error weightand residual error threshold of a vascular region in each second imagesub-block according to retinal vessel types contained in the secondimage sub-block; step E: calculating inner products between each secondimage sub-block and each first image sub-block in the blood vasculardictionary, determining a first image sub-block with maximum innerproduct for each second image sub-block, and calculating the sparsecoefficient corresponding to the first image sub-block with maximuminner product; step F: for each second image sub-block, calculating aresidual error image according to the first image sub-block with maximuminner product and the second image sub-block, and calculating theresidual error of the vascular region in the second image sub-blockaccording to the residual error weight of the vascular region; step G:when the norm of the residual error is greater than the residual errorthreshold, setting the residual error image as a second image sub-block,and jumping to step E, otherwise, jumping to step H; step H:reconstructing the second image sub-block according to the sparsecoefficient; step I: reconstructing the retinal vessel image accordingto each reconstructed second image sub-block, and thereby obtaining anenhanced retinal vessel image.
 2. The retinal vessel image enhancementmethod according to claim 1, wherein the step A comprises the sub-stepsof: sub-step A1: partitioning the retinal vessel learning image into aplurality of first image sub-blocks with the same size; wherein thenumber of first image sub-blocks is greater than the preset number;sub-step A2: calculating all the inner products of every two first imagesub-blocks; sub-step A3: selecting the preset number of first imagesub-blocks with minimum inner product, and constructing the bloodvascular dictionary.
 3. The retinal vessel image enhancement methodaccording to claim 1, wherein the step B comprises the sub-steps of:sub-step B1: supposing the retinal vessel image to be enhanced asI(x,y), and letting G(x, y; σ) be a two-dimensional Gaussian function atscale σ, smoothing the retinal vessel image I(x,y) to be enhanced usingthe two-dimensional Gaussian function, thereby obtaining a smoothedimage I_(σ)(x, y): I_(σ)(x, y)=I(x, y)⊗G(x, y; σ), where${{G\left( {x,{y;\sigma}} \right)} = {\frac{1}{\left( {\sqrt{2\pi}\sigma} \right)^{2}}e^{- \frac{x^{2} + y^{2}}{2\sigma^{2}}}}},$and ⊗ denotes a convolutional operation; sub-step B2: calculating aHessian matrix H_(σ)(x, y) at point (x,y) and scale σ in the smoothedimage I_(σ)(x,y): ${{H_{\sigma}\left( {x,y} \right)} = \begin{bmatrix}\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial x^{2}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} \\\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial y^{2}}\end{bmatrix}};$ sub-step B3: performing an eigenvalue analysis of theHessian matrix H_(σ)(x, y), then obtaining the eigenvalues λ₁ and λ₂,ordered as |λ₁|<|λ₂|; accordingly, the vascular feature at scale s canbe expressed by: ${v_{0}(s)} = \left\{ {\begin{matrix}\; & {{{e^{- \frac{R_{\beta}^{2}}{2\beta}} \cdot \left( {1 - e^{- \frac{S^{2}}{2c^{2}}}} \right)}\lambda_{2}} \leq 0} & \; \\0 & \; & {\lambda_{2} > 0}\end{matrix};} \right.$ where${R_{\beta} = \frac{\lambda_{1}}{\lambda_{2}}},$ S=√{square rootover (λ₁ ²+λ₂ ²)}, and β and C are the preset constants; sub-step B4: Ina multiscale framework, selecting the maximum value of v₀(s) at eachscale as a Frangi-based filtering result v of the retinal vessel imageI(x,y) to be enhanced:$v = {\max\limits_{s_{m\; i\; n} \leq s \leq s_{m\; {ax}}}{v_{0}(s)}}$where s_(min) and s_(max) denote the minimum and maximum scales,respectively; sub-step B5: dividing the Frangi-based filtering result vinto a plurality of second image sub-blocks overlapped each other. 4.The retinal vessel image enhancement method according to claim 1,wherein the step C comprises the sub-steps of: sub-step C1: setting up 8directional filters in the directions θ₁=0,${\theta_{2} = \frac{\pi}{8}},{\theta_{3} = \frac{\pi}{4}},{\theta_{4} = \frac{3\pi}{8}},{\theta_{5} = \frac{\pi}{2}},{\theta_{6} = \frac{5\pi}{8}},{\theta_{7} = {{\frac{3\pi}{4}\mspace{14mu} {and}\mspace{14mu} \theta_{8}} = \frac{7\pi}{8}}},$respectively; sub-step C2: assuming that Ω₁ is a vascular region by thedirectional filter in the direction θ_(i), Ω₂ is a non-vascular region,the respective energy posE_(θ) _(i) and negE_(θ) _(i) of the two regionis calculated as follows:posE _(θ) _(i) =Σ_(x=1) ^(N) ¹ Σ_(y=1) ^(N) ¹ |v(x,y)|², (x,y)∈Ω₁;negE _(θ) _(i) =Σ_(x′=1) ^(N) ² Σ_(y′=1) ^(N) ² |v(x′,y′)|², (x′,′y)∈Ω₂;where v(x,y) is the value of the Frangi-based filtering result v atpoint (x,y), N₁ is the number of pixels in Ω₁, and N₂ is the number ofpixels in Ω₂; sub-step C3: calculating the energy difference betweenposE_(θ) _(i) and negE_(θ) _(i) :Eθ _(i)=posE _(θ) _(i) −negE _(θ) _(i) ; sub-step C4: determining themaximum energy difference among the above 8 directions:${E_{{ma}\; x} = {\max\limits_{{i = 1},2,\ldots \mspace{14mu},8}{E\; \theta_{i}}}};$sub-step C5: deciding retinal vessel types based on the E_(max), whenE_(max)≥T, the retinal vessel image contained in the second imagesub-block belongs to wide vessels, otherwise it belongs to thin vessels.5. The retinal vessel image enhancement method according to claim 3,wherein the step D comprises the sub-steps of: sub-step D1: taking thevascular region by the directional filter corresponding to the maximumenergy difference among the 8 directions as a vascular region Ω₁, andtaking the non-vascular region by the directional filter correspondingto the maximum energy difference among the 8 directions as anon-vascular region Ω₂; sub-step D2: for the second image sub-blockcontaining an retinal vessel image that belongs to wide vessels, settingthe residual error weight of the vascular region Ω₁ in the second imagesub-block to 1, such that the residual error threshold T_(R)=T₁; for thesecond image sub-block containing an retinal vessel image that belongsto thin vessels, setting its residual error weight of the vascularregion Ω₁ to 1/v_(max), such that the residual error threshold T_(R)=T₂,where v_(max) denotes the maximum value among Frangi-based filteringresults of the second image sub-block.
 6. The retinal vessel imageenhancement method according to claim 1, wherein the step E comprisesthe sub-steps of: sub-step E1: Vectorizing the second image sub-block asx, and let d_(i) be first No. i image sub-block in the blood vasculardictionary; sub-step E2: taking a first image sub-block corresponding tothe largest one of inner products between each first image sub-block inthe blood vascular dictionary and the second image sub-block x as theselected No. 1 first image sub-block d_(r0):${d_{r\; 0} = {\arg \; {\max\limits_{i \in {({1,2,\ldots \mspace{11mu},k})}}{{\langle{x,d_{i}}\rangle}}}}};$Where k denotes the number of first image sub-blocks in the bloodvascular dictionary, r₀ denotes an index number of the dictionary, and<x, d_(i)> denotes the computation of inner product between x and d_(i);sub-step E3: calculating the sparse coefficient a_(r0) corresponding tothe first image sub-block d_(r0):a _(r0) =<x, d _(r0)>.
 7. The retinal vessel image enhancement methodaccording to claim 1, wherein the step F comprises the sub-steps of:sub-step F1: calculating the residual error image R of the vascularregion in the second image sub-block:R=x−<x, d _(r0) >d _(r0); sub-step F2: multiplying the residual error Rby the residual error weight of the vascular region in the second imagesub-block, and obtaining the weighted sum as the final residual error ofvascular region in the second image sub-block.
 8. The retinal vesselimage enhancement method according to claim 1, wherein the reconstructedsecond image sub-block is defined as:$\hat{x} = {\sum\limits_{{r\; 0} \in S}{d_{r\; 0}\alpha_{r\; 0}}}$where S denotes a set of multiple sparse coefficients determined bymultiple execution of step E, d_(r0) denotes a first image sub-blockwith maximum inner product determined by execution of step E each timeand a_(r0) denotes a sparse coefficient corresponding to d_(r0).
 9. Theretinal vessel image enhancement method according to claim 1, whereinthe Step I comprises the following: merging non-overlapping parts of allthe reconstructed second image sub-blocks, thereby obtaining a completeenhanced retinal vessel image.
 10. An retinal vessel image enhancementsystem, comprising: blood vascular dictionary constructing module, whichis configured to construct a blood vascular dictionary using retinalvessel learning images, wherein the blood vascular dictionary comprisesa preset number of first image sub-blocks; image filtering and dividingmodule, which is configured to apply Frangi-based filtering to a retinalvessel image to be enhanced, and divide the obtained images havingundergone Frangi-based filtering into a plurality of second imagesub-blocks overlapped each other; blood vessel type determining module,which is configured to apply directional filtering to the second imagesub-blocks by means of a directional filter, and decide that the bloodvessels contained in the second image sub-blocks belong to wide vesselsor thin vessels based on directional filtering results; vascular regionand its residual error weight and residual error threshold determiningmodule, which is configured to determine a vascular region in eachsecond image sub-block, and set residual error weight and residual errorthreshold of a vascular region in the second image sub-block accordingto blood vessel types contained in each second image sub-block; sparsecoefficient calculating module, which is configured to calculate, foreach second image sub-block, the inner products between the second imagesub-block and each first image sub-block in the blood vasculardictionary, determine a first image sub-block with maximum inner productamong them, and calculate the sparse coefficient corresponding to thefirst image sub-block with maximum inner product; vascular regionresidual error calculating module, which is configured to calculate, foreach second image sub-block, a residual error image according to thefirst image sub-block with maximum inner product and the second imagesub-block, and calculate the residual error of the vascular region inthe second image sub-block according to the residual error weight of thevascular region; jumping module, which is configured to, when the normof the residual error is greater than the residual error threshold, setthe residual error image as a second image sub-block, and jump to thesparse coefficient calculating module, otherwise, jump to second imagesub-block reconstructing module; second image sub-block reconstructingmodule, which is configured to reconstruct the second image sub-blockaccording to the sparse coefficient; retinal vessel image reconstructingmodule, which is configured to reconstruct the retinal vessel imageaccording to each reconstructed second image sub-block, and therebyobtaining an enhanced retinal vessel image.
 11. The retinal vessel imageenhancement system according to claim 10, wherein the blood vasculardictionary constructing module comprises: retinal vessel learning imagedividing module, which is configured to partition the retinal vessellearning image into several first image sub-blocks with the same size;and the number of first image sub-blocks is greater than the set number;first image sub-block inner product module, which is configured tocalculate all the inner products of every two first image sub-blocks;blood vascular dictionary constructing submodule, which is configured toselect the preset number of first image sub-blocks with minimum innerproduct, and construct the blood vascular dictionary.
 12. The retinalvessel image enhancement system according to claim 10, wherein the imagefiltering and dividing module comprises: smooth filtering module, whichis configured to define the retinal vessel image to be enhanced as I(x,y), and let G(x, y; σ) be a two-dimensional Gaussian function at scaleσ, smooth the retinal vessel image I(x,y) to be enhanced using thetwo-dimensional Gaussian function, thereby obtaining a smoothed imageI_(σ)(x, y): I_(σ)(x, y)=I(x, y)⊗G(x, y; σ), where${{G\left( {x,{y;\sigma}} \right)} = {\frac{1}{\left( {\sqrt{2\pi}\sigma} \right)^{2}}e^{- \frac{x^{2} + y^{2}}{2\sigma^{2}}}}},$and ⊗ denotes convolutional operation; Hessian matrix calculatingmodule, which is configured to calculate a Hessian matrix H_(σ)(x, y) atpoint (x,y) and scale σ in the smoothed image I_(σ)(x,y):${{H_{\sigma}\left( {x,y} \right)} = \begin{bmatrix}\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial x^{2}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} \\\frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{{\partial x}{\partial y}} & \frac{\partial{I_{\sigma}^{2}\left( {x,y} \right)}}{\partial y^{2}}\end{bmatrix}};$ eigenvalue analyzing module, which is configured toperform an eigenvalue analysis of the Hessian matrix H_(σ)(x, y), thenobtain the eigenvalues λ₁ and λ₂, ordered as |λ₁|<|λ₂|; accordingly, thevascular feature at scale s can be expressed by:${v_{0}(s)} = \left\{ {\begin{matrix}{e^{- \frac{R_{\beta}^{2}}{2\beta}} \cdot \left( {1 - e^{- \frac{S^{2}}{2C^{2}}}} \right)} & {\lambda_{2} \leq 0} \\0 & {\lambda_{2} > 0}\end{matrix};} \right.$ where${R_{\beta} = \frac{\lambda_{1}}{\lambda_{2}}},$ S=√{square rootover (λ₁ ²+λ₂ ²)}, and β and C are the preset constants; Frangi-basedfiltering result generating module, which is configured to, in amultiscale framework, select the maximum value of v₀(s) at each scale asa Frangi-based filtering result v of the retinal vessel image I(x, y) tobe enhanced:$v = {\max\limits_{s_{m\; i\; n} \leq s \leq s_{m\; {ax}}}{v_{0}(s)}}$where s_(min) and s_(max) denote the minimum and maximum scales,respectively; second image sub-block dividing module, which isconfigured to divide the Frangi-based filtering result v into aplurality of second image sub-blocks overlapped each other.
 13. Theretinal vessel image enhancement system according to claim 10, whereinthe blood vessel type determining module comprises: directional filtersetting module, which is configured to set up 8 directional filters inthe directions θ₁=0,${\theta_{2} = \frac{\pi}{8}},{\theta_{3} = \frac{\pi}{4}},{\theta_{4} = \frac{3\pi}{8}},{\theta_{5} = \frac{\pi}{2}},{\theta_{6} = \frac{5\pi}{8}},{\theta_{7} = {{\frac{3\pi}{4}\mspace{14mu} {and}\mspace{14mu} \theta_{8}} = \frac{7\pi}{8}}},$respectively; energy calculating module, which is configured to,assuming that Ω₁ is a vascular region by the directional filter in thedirection θ_(i), Ω₂ is a non-vascular region, thus calculate therespective energy posE_(θ) _(i) and negE_(θ) _(i) of the two region asfollows:posE _(θ) _(i) =Σ_(x=1) ^(N) ¹ Σ_(y=1) ^(N) ¹ |v(x,y)|², (x,y)∈Ω₁;negE _(θ) _(i) =Σ_(x′=1) ^(N) ² Σ_(y′=1) ^(N) ² |v(x′,y′)|², (x′,′y)∈Ω₂;where v(x,y) is the value of the Frangi-based filtering result v atpoint (x,y), N₁ is the number of pixels in Ω₁, and N₂ is the number ofpixels in Ω₂; energy difference calculating module, which is configuredto calculate the energy difference between posE_(θ) _(i) and negE_(θ)_(i) :Eθ _(i)=posE _(θ) _(i) −negE _(θ) _(i) ; maximum energy differencedetermining module, which is configured to determine the maximum energydifference among the above 8 directions:${E_{m\; {ax}} = \; {\max\limits_{{i = 1},2,\ldots \mspace{14mu},8}{E\; \theta_{i}}}};$blood vessel type determining submodule, which is configured to decideblood vessel types based on the E_(max) , when E_(max)≥T, the retinalvessel image contained in the second image sub-block belongs to widevessels, otherwise it belongs to thin vessels.
 14. The retinal vesselimage enhancement system according to claim 13, wherein the vascularregion and its residual error weight and residual error thresholddetermining module comprises: vascular region determining module, whichis configured to take the vascular region by the directional filtercorresponding to the maximum energy difference among the 8 directions asa vascular region Ω₁, and take the non-vascular region by thedirectional filter corresponding to the maximum energy difference amongthe 8 directions as a non-vascular region Ω₂; residual error weight andresidual error threshold determining module which is configured to, forthe second image sub-block containing an retinal vessel image thatbelongs to wide vessels, set the residual error weight of the vascularregion Ω₁ to 1, such that the residual error threshold T_(R)=T₁; for thesecond image sub-block containing an retinal vessel image that belongsto thin vessels, set its residual error weight of the vascular region Ω₁to 1/v_(max), such that the residual error threshold T_(R)=T₂, wherev_(max) denotes the maximum value among Frangi-based filtering resultsof the second image sub-block.
 15. The retinal vessel image enhancementsystem according to claim 10, wherein the sparse coefficient calculatingmodule comprises: image vectorizing module, which is configured tovectorize the second image sub-block as x, and take d_(i) as first No. iimage sub-block in the blood vascular dictionary; first image sub-blockselecting module, which is configured to take a first image sub-blockcorresponding to the largest one of inner products between each firstimage sub-block in the blood vascular dictionary and the second imagesub-block x as the selected No. 1 first image sub-block d_(r0):${d_{r\; 0} = {\arg \; {\max\limits_{i \in {({1,2,\ldots \mspace{14mu},k})}}{{\langle{x,d_{i}}\rangle}}}}};$where k denotes the number of first image sub-blocks in the bloodvascular dictionary, r₀ denotes an index number of the dictionary, and<x,d_(i)> denotes the computation of inner product between x and d_(i);sparse coefficient calculating submodule, which is configured tocalculate the sparse coefficient a_(r0) corresponding to the first imagesub-block d_(r0):a _(r0) =<x, d _(r0)>.
 16. The retinal vessel image enhancement systemaccording to claim 10, wherein the vascular region residual errorcalculating module comprises: residual error preliminarily calculatingmodule, which is configured to calculate the residual error image R ofthe vascular region in the second image sub-block:R=x−<x, d _(r0) >d _(r0); residual error weighting module, which isconfigured to multiply the residual error R by the residual error weightof the vascular region in the second image sub-block, and obtain theweighted sum as the final residual error of vascular region in thesecond image sub-block.
 17. The retinal vessel image enhancement systemaccording to claim 10, wherein the reconstructed second image sub-blockis defined as:$\hat{x} = {\sum\limits_{{r\; 0} \in S}{d_{r\; 0}\alpha_{r\; 0}}}$where S denotes a set of multiple sparse coefficients determined by thesparse coefficient calculating module multiple times, d_(r0) denotes afirst image sub-block with maximum inner product determined by thesparse coefficient calculating module each time and a_(r0) denotes asparse coefficient corresponding to d_(r0).
 18. The retinal vessel imageenhancement system according to claim 10, wherein the retinal vesselimage reconstructing module is specifically used to: mergenon-overlapping parts of all the reconstructed second image sub-blocks,thereby obtaining a complete enhanced retinal vessel image.